﻿using System.Windows.Controls;

namespace LeanApp.View
{
    /// <summary>
    /// LearnCtrl.xaml 的交互逻辑
    /// </summary>
    public partial class LearnCtrl : UserControl
    {
        /// <summary>
        /// 学习曲线控件
        /// </summary>
        public LearnCtrl()
        {
            InitializeComponent();
            InitialCtrl();
        }

        /// <summary>
        /// 初始化控件
        /// </summary>
        private void InitialCtrl()
        {
            LearnDataCtrl ctrl1 = new LearnDataCtrl(1);
            LearnDataCtrl ctrl2 = new LearnDataCtrl(2);
            LearnDataCtrl ctrl3 = new LearnDataCtrl(3);
            LearnDataCtrl ctrl4 = new LearnDataCtrl(4);
            ctrl1.Name = "LearnData1";
            ctrl1.Margin = new System.Windows.Thickness(4);
            grid.Children.Add(ctrl1);
            Grid.SetColumn(ctrl1, 0);
            Grid.SetRow(ctrl1, 0);

            ctrl2.Name = "LearnData2";
            grid.Children.Add(ctrl2);
            ctrl2.Margin = new System.Windows.Thickness(4);
            Grid.SetColumn(ctrl2, 1);
            Grid.SetRow(ctrl2, 0);

            ctrl3.Name = "LearnData3";
            grid.Children.Add(ctrl3);
            ctrl3.Margin = new System.Windows.Thickness(4);
            Grid.SetColumn(ctrl3, 0);
            Grid.SetRow(ctrl3, 1);

            ctrl4.Name = "LearnData4";
            grid.Children.Add(ctrl4);
            ctrl4.Margin = new System.Windows.Thickness(4);
            Grid.SetColumn(ctrl4, 1);
            Grid.SetRow(ctrl4, 1);
        }
    }
}
